<template>
  <div id="app">
    <label for="" v-for="(item, index) in arr" :key="index"><input type="checkbox" v-model="chk" :value="item">{{item}}</label>
    <p>你选中的元素，累加值的和为：{{total}}</p>
  </div>
</template>

<script>
export default {
  data () {
    return {
      chk: [],
      arr: [9, 15, 19, 25, 29, 31, 48, 57, 62, 79, 87]
    }
  },
  // 累加和
  computed: {
    total () {
      return this.chk.reduce((p, n) => p + n, 0)
    }
  }
}
</script>

<style>

</style>
